<?php
require_once("..\config.php");
$result = mysql_query("SELECT * FROM place WHERE Place_id='".$_GET['id']."'",$conn) or die(mysql_error());

if (mysql_num_rows($result) > 0) {
    $response["place"] = array();

    while ($row = mysql_fetch_array($result)) {
		$place = array();
		$place["id"] = $row["Place_id"];
		$place["name"] = $row["Place_title"];
		$place["add"] = $row["Address"];
		$place["pos"] = $row["Position"];
		$place["des"] = $row["Description"];
		$place["thumb"] = explode(';', $row["Image"]);
		//$place["img"] = explode(';', $row["Detail_image"]);	
		$place["img"] = $place["thumb"];
		$them = explode(';', $row["Detail_image"]);	
		foreach ($them as $value){
				array_push($place["img"], $value);
		}
			
		array_push($response["place"], $place);

    }
	header('Content-Type: application/json');
	echo ( json_encode($response));
} 
?>